package com.mdd.admin.vo.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 用户Vo
 */
@Data
@ApiModel(value = "用户信息", description = "用户信息")
public class UserVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户id")
    private Integer id;
    @ApiModelProperty(value = "用户编号")
    private Integer sn;
    @ApiModelProperty(value = "用户头像")
    private String avatar;
    @ApiModelProperty(value = "真实姓名")
    private String realName;
    @ApiModelProperty(value = "昵称")
    private String nickname;
    @ApiModelProperty(value = "用户名")
    private String username;
    @ApiModelProperty(value = "手机号")
    private String mobile;
    @ApiModelProperty(value = "性别")
    private String sex;
    @ApiModelProperty(value = "渠道")
    private String channel;
    @ApiModelProperty(value = "余额")
    private BigDecimal money;
    @ApiModelProperty(value = "最后登录ip")
    private String lastLoginIp;
    @ApiModelProperty(value = "最后登录时间")
    private String lastLoginTime;
    @ApiModelProperty(value = "创建时间")
    private String createTime;

    public void setSex(Integer sex) {
        switch (sex) {
            case 0:
                this.sex = "未知";
                break;
            case 1:
                this.sex = "男";
                break;
            case 2:
                this.sex = "女";
                break;
        }
    }

}
